package com.cizzy.favorite.entity.dao;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.sql.Timestamp;

/**
 * <p>
 * 
 * </p>
 *
 * @author crissy-月下闲人
 * @since 2023-10-29
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "videoCount")
public class VideoCountDAO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @TableId("video_id")
    private Long videoId;

    private Timestamp createAt;

    private Long favoriteCount;

    private Long commentCount;

    private Long shareCount;

    public VideoCountDAO(Long videoId) {
        this.videoId = videoId;
//        this.createAt = System.currentTimeMillis();
        this.createAt = new Timestamp(System.currentTimeMillis());
        this.favoriteCount = 0L;
        this.commentCount = 0L;
        this.shareCount = 0L;
    }
}
